Hello. Its me again. I have write a simple dxl. He was supposed to be capable of when run in the current module apply a filter, then based on this filter, open another module and apply another filter, then print the info of both modules... The is I wanted it to export the information from both modules to a same Excel doc. I dont even know if it is possible. Anyway can somebody help me see here it was wrong. Thanks. =)
Module mA = current
Object oA
Skip skpA = createString()
filtering off
Filter Saftey = (attribute "my attr" != "")
set(mA, Saftey)
filtering on
refresh current
for oA in mA do{
put(skpA, identifier(oA), oA) {
Module mB = edit("the other module path", false)
load(mB, view("the desired view"))
Object oB
filtering off
for oB in mB do {
Filter TT = (find(skpA, (oB."Requirement tag" "")))
set(mB, TT)
}
filtering on
print oB."Object Text" "\n\n"
print oA."Object Text" "\n\n"
}
}
braolive - Tue Jul 02 07:53:11 EDT 2013 |
Re: Filter two diferent modules Open module mB only once. Open it "read". Since you figure to load a view it must be visible (unless you cleverly search forum for loading views in invisible modules).
Be sure to assign the current module before your "filtering" command:
[1] Filtering. If I read this correclty, you want to display those oB objects that contain "Requirement Tag" of any displayed oA Identifier. That is unsuitable for using a "Filter" variable, as you would need to define a huge number of such filters and "OR" them together. Would look like:
Instead you can do a manual filter:
Understand that an "accept/reject" manual filter is not a "Filter" and will not save in a view. [2] Export. If I infer correctly, you really do not care about "filtering", but rather you want to print each A object side-by-side with it's corresponding B object. If so, you don't care about any filter for mB.
Overall then, it seems to me this structure will work:
-Louie |